package FinalProject

class SiteUser {
    String name
    Date dateJoined
    SortedSet<Review> reviews

    static hasMany = [reviews: Review]

    static constraints = {
        reviews(nullable: true)
    }

    def post(String message, Game game) {
        Review r = new Review(reviewText: message, game: game)
        this.addToReviews(r)
        game.addToReviews(r)
    }


}